-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support RS256 JWTs #177
Merged
Merged
Support RS256 JWTs #177
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There are some 2021-edition crates that Cargo was warning about.
So it's Base64<PEM bytes>, not just PEM bytes.
The JWT spec [1] basically says that JWTs must validate the `aud` claim if its specified: > If the principal > processing the claim does not identify itself with a value in the > "aud" claim when this claim is present, then the JWT MUST be > rejected. [1]: https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3
Since we now validate the `sub` and `nbf` claims, they need to be set when atticadm generates them.
…serializing `false` permissions
This effectively reverts commit 3e0b65a. Because jwt_simple doesn't have a unified type / trait that allows signature and verification, I had to add a SignatureType enum to approximate that.
This does make it decode the keys every iteration in the stability test, which isn't too much of an issue and can be fixed later.
Closed
Closed
This was referenced Oct 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continuation of #99.
Diff apart from merging main: 5d6560e...d2363b5
I'll be adding support for pluggable authentication layers (namely for Biscuit) and a client-server contract to bootstrap authentication (e.g., OIDC with refresh tokens), to be rebased.
Migrating existing HS256 setups
Existing configs with
token-hs256-secret-base64
will result in an error describing the migration path. As a reference, for an existing config like the following:Move it to the bottom of the config, then add
[jwt.signing]
like so: